'use strict';
var rank_desc = function(collection){
  var a=collection.length;
  for(let i=0;i<a;i++){
     for(let j=0;j<a-1-i;j++){
         if(collection[j]>collection[j+1]){
           var temp=collection[j+1];
           collection[j+1]=collection[j];
           collection[j]=temp;
         }
    }
  }
console.log(collection);
return collection;



  //  return [2,3,4,5,6];
};

module.exports = rank_desc;
